package com.ego.client;

import com.ego.pojo.bo.SpuBo;
import com.ego.pojo.vo.ResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Ares
 * @date 2020-11-28
 */
@FeignClient("ItemService")
@RequestMapping("/goods")
public interface GoodsFeignClient {

    @GetMapping("/spu/pageForES")
    public ResponseEntity<ResultVO<SpuBo>> page(
            @RequestParam(value = "saleable",required = false)Boolean saleable,
            @RequestParam("page")Integer page,
            @RequestParam("rows")Integer rows);

    @GetMapping("/spubo/{id}")
    public SpuBo queryGoodsById(@PathVariable("id") Long id);
}
